import request from '@/utils/request'

// 创建传感器租户配置
export function createSensorTenantResource(data) {
  return request({
    url: '/hardware/sensor-tenant-resource/create',
    method: 'post',
    data: data
  })
}

// 更新传感器租户配置
export function updateSensorTenantResource(data) {
  return request({
    url: '/hardware/sensor-tenant-resource/update',
    method: 'put',
    data: data
  })
}

// 删除传感器租户配置
export function deleteSensorTenantResource(id) {
  return request({
    url: '/hardware/sensor-tenant-resource/delete?id=' + id,
    method: 'delete'
  })
}

// 获得传感器租户配置
export function getSensorTenantResource(id) {
  return request({
    url: '/hardware/sensor-tenant-resource/get?id=' + id,
    method: 'get'
  })
}

// 获得传感器租户配置列表
export function getSensorTenantResourceList(query) {
  return request({
    url: '/hardware/sensor-tenant-resource/list',
    method: 'get',
    params: query
  })
}


// 获得传感器租户配置分页
export function getSensorTenantResourcePage(query) {
  return request({
    url: '/hardware/sensor-tenant-resource/page',
    method: 'get',
    params: query
  })
}

// 导出传感器租户配置 Excel
export function exportSensorTenantResourceExcel(query) {
  return request({
    url: '/hardware/sensor-tenant-resource/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
